import 'package:architecture/os_size.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../../widgets/text_button.dart';
import 'rust_study_controller.dart';

class RustStudyPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GetBuilder<RustStudyController>(
        init: RustStudyController(),
        builder: (controller) {
          return Scaffold(
              appBar: AppBar(title: Text('rust_study')),
              body: Container(
                  margin: EdgeInsets.symmetric(horizontal: 20, vertical: 20),
                  height: windowHeight,
                  child: Wrap(
                      alignment: WrapAlignment.start,
                      crossAxisAlignment: WrapCrossAlignment.start,
                      spacing: 20,
                      runSpacing: 20,
                      children: [
                        MyTextButton(
                          text: "学习资料",
                          confirm: () {
                            controller.goRust();
                          },
                        ),
                        MyTextButton(
                          text: "图片灰化",
                          confirm: () {
                            controller.goPictureAshingPage();
                          },
                        ),
                        MyTextButton(
                          text: "图片格式转换",
                          confirm: () {
                            controller.goPictureFormatChange();
                          },
                        ),
                        MyTextButton(
                          text: "图片亮度调节",
                          confirm: () {},
                        ),
                      ])));
        });
  }
}
